<?php
/**
 * JSON视图
 * 
 * 通过json_encode函数输出
 * 
 * @author Leo Ning <leo.ning@like18.com> 2010-11-14 12:25
 * @version 1.0
 * @since 1.0
 * @copyright 2008-2011 LIKE18 INC.
 * @package view
 */

class JsonView extends View {
	public $merge_vars = false; //不需要合并变量
	/**
	 * 绘制
	 * @param Action $action
	 * @param string $module
	 * @return string
	 */
	public function render($action, $module) {
		$data = $this->data;
		return json_encode ( $data );
	}
	public function setHeader() {
		@header ( 'Content-type: application/json', true );
	}
}